﻿<Application x:Class="BlueMarble.Genesis.Shell.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:InfrastructureControls="clr-namespace:BlueMarble.Genesis.Infrastructure.Controls;assembly=BlueMarble.Genesis.Infrastructure">

    <Application.Resources>
        <Style TargetType="InfrastructureControls:TabItem" x:Key="BlackBarTabItemResourceKey">
            <Setter Property="Foreground" Value="White"/>
            <Setter Property="FontSize" Value="12"/>
            <Setter Property="Height" Value="36" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="InfrastructureControls:TabItem">
                        <Grid>
                            <Border Margin="0" x:Name="Border" Background="Transparent" BorderBrush="Black" BorderThickness="0" CornerRadius="4">
                                <Grid>
                                    <ContentPresenter HorizontalAlignment="Center" Margin="12,2,12,2" x:Name="ContentSite" VerticalAlignment="Center" RecognizesAccessKey="True" ContentSource="Header"/>
                                </Grid>
                            </Border>
                        </Grid>

                        <ControlTemplate.Triggers>
                            <Trigger Property="IsSelected" Value="True">
                                <Setter Property="Foreground" Value="WhiteSmoke"/>
                                <Setter Property="FontSize" Value="16"/>
                                <Setter Property="Opacity" Value="0.3" TargetName="Border"/>
                                <Setter Property="Background" Value="Black" TargetName="Border"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style TargetType="InfrastructureControls:TabControl" x:Key="BlackBarTabControlResourceKey">
            <Setter Property="Foreground" Value="Black" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="InfrastructureControls:TabControl">
                        <Grid KeyboardNavigation.TabNavigation="Local">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="48"/>
                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>

                            <TabPanel Grid.Row="0" Margin="6" x:Name="HeaderPanel" IsItemsHost="True" Panel.ZIndex="1" KeyboardNavigation.TabIndex="1">
                                <TabPanel.Background>
                                    <SolidColorBrush Color="Black" Opacity="0.6" />
                                </TabPanel.Background>
                            </TabPanel>

                            <Border Grid.Row="1" Margin="2" x:Name="Border" Background="Transparent" BorderBrush="Black" CornerRadius="3" KeyboardNavigation.DirectionalNavigation="Contained" KeyboardNavigation.TabNavigation="Local" KeyboardNavigation.TabIndex="2">
                                <Grid>
                                    <ContentPresenter Margin="4" x:Name="PART_SelectedContentHost" ContentSource="SelectedContent"/>
                                </Grid>
                            </Border>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

    </Application.Resources>
</Application>
